import time

from application.run import CrawlerTask

if __name__ == "__main__":
    agent = CrawlerTask(max_queue_size=30)
    input_text = "查找关于供应链或者行业报告信息"
    url_task_list = [
        {
            "url": "https://procurementmag.com/",
            "depth":5,
            "breadth": 100,
            "brower": True
        }
    ]
    start_time = time.time()
    agent.process(input_text=input_text,
                  url_task_list=url_task_list)
    data = agent.get_queue()
    for i in data:
        print(i)
    print("总耗时: ", time.time() - start_time)
